<%--
  Created by IntelliJ IDEA.
  User: 黄玉香
  Date: 2018/12/12
  Time: 1:28
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>编辑攻略</title>
    <!--bootstrap环境-->
    <link href="http://apps.bdimg.com/libs/bootstrap/3.3.0/css/bootstrap.min.css" rel="stylesheet">
    <script src="jquery/jquery-1.11.1.min.js"></script>
    <script type="text/javascript" src="bootstrap/js/bootstrap.min.js"></script>
    <!-ckeditor编辑器环境-->
    <script type="text/javascript" src="ckeditor/ckeditor.js"></script>
    <script type="text/javascript" src="${pageContext.request.contextPath}/ckeditor/config.js"></script>
    <style>
        .form{
            margin: 100px auto;
        }
       #myeditor{
           margin-top: 70px;
       }
        #editform{
            display: block;
        }
    </style>
</head>
<body id="body">
<jsp:include page="navBar.jsp"></jsp:include>
<div class="container">
    <div  id="myeditor">
        <div class="form">
            <form role="form" class="col-md-10" id="editform" action="RaiderController" method="post">
                <%
                if (session.getAttribute("users")==null){
                    response.sendRedirect(request.getContextPath()+"/login.jsp");
                }
                if (request.getAttribute("error")!=null){
                %>
                <div class="alert alert-warning">
                    <button type="button" class="close" aria-hidden="true">&times;</button>
                    <strong>警告！</strong><span class="tooltip"><%= request.getAttribute("error")%>/span>
                </div>
                <%
                    }
                %>
                <div class="form-group">
                    <label size="30">攻略标题</label>
                    <input type="text" class="form-control col-md-10"
                           placeholder="输入标题" name="headline">
                </div>
                <br>
                <br>
                <div class="form-group">
                    <div>
                        <textarea name="content" class="col-md-10"></textarea>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-10 "aria-orientation="horizontal">
                        <input type="submit" class="btn btn-primary pull-right" value="发表攻略"></button>
                        <button class="btn btn-primary" type="submit" onclick="window.location.href='/index.jsp'">返回</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script type="text/javascript">CKEDITOR.replace('content')</script>
<jsp:include page="footer.jsp"></jsp:include>
</body>
</html>
